<%-- Cmpyright (c) 2001 BroadVision, Inc. All rights reserved              --%>
<%-- The product described in this manual may be protected by one or more  --%>
<%-- U.S. and International patents. The BroadVision One-To-One software   --%>
<%-- is covered by U.S. patent 5,710,887.                                  --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and the BroadVision logo are registered       --%>
<%-- trademarks, and BroadVision One-To-One is a trademark of BroadVision, --%>
<%-- Inc. IONA and Orbix are trademarks of IONA Technologies, Ltd. RSA,    --%>
<%-- MD5, and RC2 are trademarks of RSA Data Security, Inc. All other      --%>
<%-- trademarks, service marks, and trade names belong to their respective --%>
<%-- owners. BroadVision, Inc. disclaims any proprietary interest in the   --%>
<%-- marks and names of others.                                            --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@page import="java.util.Currency"%>
<%@page import="java.util.Locale"%>

<%
  Currency locCurrency = Currency.getInstance(Locale.getDefault());
  String symbol = locCurrency.getSymbol();
%>
<div>
<table width="100%" cellspacing="0" cellpadding="0" border="0" summary="Main body">
  <tr>        

  <td width="100%" class="column2" valign="top">
     
  <table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="orders search">
        <tr>
        <td valign="top">
      <div class="pageTitle">
      	<bean:message bundle="ss" key="demand.order.label.orderDetails"/> : 
      	<c:out value="${orderDetailView.map.orderNumber}"/>
      </div>    

      <div class="errorMessage"><html:errors bundle="ss"/></div>
      <div><%@include file="/mc/common/pagetab.jsp"%></div>
      
      <div class="pageSubtitle">
        <span class="left"><bean:message bundle="ss" key="demand.order.label.orderInfo"/></span>
        <span class="right">
          &nbsp;
        </span>
      </div>
      <div class="blockWrap">
        
       <table class="labelForm" border="0" cellspacing="0" cellpadding="2" summary="Order Info" width="100%">
          <tr>
            <td class="label" width="15%"><bean:message bundle="ss" key="demand.order.label.date"/>:</td>
            <td class="labelField" width="85%">
            <bean:write name="orderDetailView" property="orderDate" formatKey="format.datetime.short" bundle="mc.messages"/>
            </td>
          </tr>
	  <tr>
            <td class="label" width="15%"><bean:message bundle="ss" key="demand.order.label.submitter"/>:</td>
            <td class="labelField" width="85%"><c:out value="${orderDetailView.map.submitter}"/>
            </td>
          </tr>
	  <tr>
            <td class="label" width="15%"><bean:message bundle="ss" key="demand.order.label.orderNumber"/>:</td>
            <td class="labelField" width="85%"><c:out value="${orderDetailView.map.orderNumber}"/>
            </td>
          </tr>
	  <tr>
            <td class="label" width="15%"><bean:message bundle="ss" key="demand.order.label.orderState"/>:</td>
            <td class="labelField" width="85%"><c:out value="${orderDetailView.map.orderState}"/>
            </td>
          </tr>
	  <tr>
            <td class="label" width="15%"><bean:message bundle="ss" key="demand.order.label.paymentType"/>:</td>
            <td class="labelField" width="85%"><c:out value="${orderDetailView.map.paymentType}"/>
            </td>
          </tr>
	  <tr>
            <td class="label" width="15%"><bean:message bundle="ss" key="demand.order.label.cardNumber"/>:</td>
            <td class="labelField" width="85%"><c:out value="${orderDetailView.map.cardNumber}"/>
            </td>
          </tr>
	  </table>  
                
      <div class="pageSubsubtitle">
      	<bean:message bundle="ss" key="demand.order.label.purchaseTitle"/>  - 
      	<c:out value="${orderDetailView.map.numOfItems}"/> products
      </div>
      
      <table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="Cart items" width="100%">
         <tr class="listHeader">
	    <th id="Download" align="left">&nbsp;</th>
            <th id="LineItem" align="left"><bean:message bundle="ss" key="demand.cart.label.lineItem"/></th>
            <th id="Product" align="left"><bean:message bundle="ss" key="demand.cart.label.product"/></th>
	    <th id="Quantity" align="left"><bean:message bundle="ss" key="demand.cart.label.quantity"/></th>
	    <th id="ShipTo" align="left"><bean:message bundle="ss" key="demand.cart.label.shippingAddress"/></th>
	    <th id="ShippingMethod" align="left"><bean:message bundle="ss" key="demand.cart.label.shippingMethod"/></th>
            <th id="UnitPrice" align="left"><bean:message bundle="ss" key="demand.cart.label.unitPrice"/></th>
            <th id="Total" align="left"><bean:message bundle="ss" key="demand.cart.label.total"/></th>
          </tr>
          
          
          <c:if test="${not empty orderDetailView.map.itemList}">    
	       <c:forEach var="item" items="${orderDetailView.map.itemList}" varStatus="index">	      		
	         <c:choose>
	             <c:when test="${(index.count + 1) % 2 == 0}">
	      	      	<tr class="listEven">
	             </c:when> 
	             <c:otherwise>
	      	      	<tr class="listOdd">
	      	     </c:otherwise>
	         </c:choose> 
	        		 
  		 <td valign="top" headers="Download">
  		     <c:choose>
	  		<c:when test="${!item.map.shippable && item.map.digitalRefPath != ''}" >
			   <a href='<c:out value="${item.map.digitalRefPath}"/>' >
				<html:img page="/demand/images/action/icon_download.gif" 
				styleClass="actionIcon" border="0" title="Download now!" alt="Download now!" />
			    </a>
			</c:when>
			<c:otherwise>
			    &nbsp;
			</c:otherwise>
	             </c:choose>
              	 </td>
              	 
              	 <td valign="top" headers="LineItem">
		 	<c:out value="${item.map.itemIndex}"/>
              	 </td>
	         <td headers="Product" valign="top">
			<c:out value="${item.map.name}"/>
		 </td>
		 <td headers="Quantity" valign="top">
		        <c:out value="${item.map.quantity}"/>
               	 </td>	
		 <td headers="ShipTo" valign="top">
		 	<c:out value="${item.map.shipTo}"/>
                 </td>
                 <td headers="ShippingMethod" valign="top">
		 	<c:out value="${item.map.shippingMethod}"/>
                 </td> 
            	 <td headers="UnitPrice" valign="top">
		       <%=symbol%><c:out value="${item.map.unitPrice}"/>
               	 </td>
                 <td headers="Total" valign="top">
	    	       <%=symbol%><c:out value="${item.map.itemTotal}"/>
               	 </td>                
	         </tr>
	       </c:forEach>
	 </c:if>
          <tr class="listHeader">
            <td colspan="7" align="right"><bean:message bundle="ss" key="demand.cart.label.subtotal"/></td>
            <td align="left"><%=symbol%><c:out value="${orderDetailView.map.totalPrice}"/></td>
          </tr>
          <tr class="listHeader">
            <td colspan="7" align="right"><bean:message bundle="ss" key="demand.cart.label.totalDiscount"/></td>
            <td align="left">(<%=symbol%><c:out value="${orderDetailView.map.totalDiscount}"/>)</td>
          </tr>
          <tr class="listHeader">
            <td colspan="7" align="right"><bean:message bundle="ss" key="demand.cart.label.totalShipping"/></td>
            <td align="left"><%=symbol%><c:out value="${orderDetailView.map.totalShipping}"/></td>
          </tr>
          <tr class="listHeader">
            <td colspan="7" align="right"><bean:message bundle="ss" key="demand.cart.label.totalTax"/></td>
            <td align="left"><%=symbol%><c:out value="${orderDetailView.map.totalTax}"/></td>
          </tr>           
          <tr class="listHeader">
            <td colspan="7" align="right"><bean:message bundle="ss" key="demand.cart.label.grandTotal"/></td>
            <td align="left"><%=symbol%><c:out value="${orderDetailView.map.grandTotal}"/></td>
          </tr>

        </table>
	</div>
   
      
      </td>
      </tr>
      </table>
    </td>  
 
  </tr>
</table>  

</div>